package tech.aistar.corejava.day02;

import java.util.Calendar;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:常量的应用场景 - 提高程序的可读性
 * @date 2019/7/16 0016
 */
public class CalendarDemo {
    public static void main(String[] args) {
        //1. 获取日历对象
        Calendar cal = Calendar.getInstance();
        System.out.println(cal);


        //int year = cal.get(1);
        int years = cal.get(Calendar.YEAR);
        System.out.println(years);

        System.out.println(Calendar.YEAR);

        //int a = 20;
    }
}
